@extends('admin.superadmin.layout.layout')
@section('content')
    <div class="row">
        <div class="col-lg-12">
            <h1 class="page-header">用户添加</h1>
        </div>        
    </div>
	
	<div class="col-lg-12">
        <div class="panel panel-default">   
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6 col-lg-offset-3">

                    	@if(session('error'))

							{{session('error')}}

                    	@endif
						
						@if (count($errors) > 0)
    						<div class="alert alert-danger">
       						<ul>
			            @foreach ($errors->all() as $error)
			                <li>{{ $error }}</li>
					    @endforeach
						    </ul>
						    </div>
						@endif	

                        <form role="form" action="{{url('/admin/superadmin/user/insert')}}" method="post" enctype="multipart/form-data">
                            <div class="form-group">
                                <label>用户名</label>
                                <input class="form-control" type="text" name="name" value="{{old('name')}}">  
                            </div>
                             <div class="form-group">
                                <label>密码</label>
                                <input class="form-control" type="password" name="password" value="{{old('password')}}">  
                            </div>
                            <div class="form-group">
                                <label>权限</label>
                                <input class="form-control" type="text" name="make" value="{{old('make')}}">  
                            </div>
                            	
                            
   							{{csrf_field()}}	
                            <br>
                            <button type="submit" class="btn btn-primary pull-left">添加用户</button>
                            <button type="result" class="btn btn-danger pull-right">重置</button>
                        </form>
                   
                        </form>
                    </div>
                    <!-- /.col-lg-6 (nested) -->
                </div>
                <!-- /.row (nested) -->
            </div>

            <!-- /.panel-body -->
        </div>
        <!-- /.panel -->
    </div> 

@endsection